<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SPHinXsys: SPH::Branch Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SPHinXsys
   &#160;<span id="projectnumber">alpha version</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespace_s_p_h.html">SPH</a></li><li class="navelem"><a class="el" href="class_s_p_h_1_1_branch.html">Branch</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="class_s_p_h_1_1_branch-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">SPH::Branch Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a41c8d82406002d0a13be6ab75a26fb1f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_branch.html#a41c8d82406002d0a13be6ab75a26fb1f">Branch</a> (<a class="el" href="class_s_p_h_1_1_s_p_h_body.html">SPHBody</a> *body, <a class="el" href="classint.html">int</a> parent_id, <a class="el" href="classint.html">int</a> init_node_idx, Vecd init_dir, Real l, Real angle, Real w, <a class="el" href="class_s_p_h_1_1_node.html">Node</a> *node, std::vector&lt; <a class="el" href="classint.html">int</a> &gt; &amp;family_nodes_idx, <a class="el" href="classint.html">int</a> n_segments)</td></tr>
<tr class="separator:a41c8d82406002d0a13be6ab75a26fb1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab515674e89dd745d12825c438f26b243"><td class="memItemLeft" align="right" valign="top">Point&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_branch.html#ab515674e89dd745d12825c438f26b243">creatNewBranchNode</a> (Point init_node, Vecd dir)</td></tr>
<tr class="memdesc:ab515674e89dd745d12825c438f26b243"><td class="mdescLeft">&#160;</td><td class="mdescRight">Functions that creats a new node in the mesh surface and it to the queue is it lies in the surface.  <a href="#ab515674e89dd745d12825c438f26b243">More...</a><br /></td></tr>
<tr class="separator:ab515674e89dd745d12825c438f26b243"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:aa1a0f16b34a6b9a1bed32e2dff66e0e4"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classint.html">int</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_branch.html#aa1a0f16b34a6b9a1bed32e2dff66e0e4">child_branchs_</a></td></tr>
<tr class="separator:aa1a0f16b34a6b9a1bed32e2dff66e0e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79fc50611d5ff8c362184f8410f32455"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classint.html">int</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_branch.html#a79fc50611d5ff8c362184f8410f32455">parent_branch_</a></td></tr>
<tr class="separator:a79fc50611d5ff8c362184f8410f32455"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7724eb0c597006ad832eeb9b6263b9a6"><td class="memItemLeft" align="right" valign="top">Vecd&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_branch.html#a7724eb0c597006ad832eeb9b6263b9a6">segment_dir_</a></td></tr>
<tr class="separator:a7724eb0c597006ad832eeb9b6263b9a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0952d5bfac3963929adc077dc446c84"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classint.html">int</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_branch.html#ac0952d5bfac3963929adc077dc446c84">node_idxs_</a></td></tr>
<tr class="separator:ac0952d5bfac3963929adc077dc446c84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa916034dcbbd9fed90893cf039b22bb4"><td class="memItemLeft" align="right" valign="top">std::vector&lt; Point &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_branch.html#aa916034dcbbd9fed90893cf039b22bb4">branch_nodes_</a></td></tr>
<tr class="separator:aa916034dcbbd9fed90893cf039b22bb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4decacd1462c03d4ee56245b3225a77e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classbool.html">bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_branch.html#a4decacd1462c03d4ee56245b3225a77e">growing_</a> = true</td></tr>
<tr class="separator:a4decacd1462c03d4ee56245b3225a77e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7ee59f1587b77188b80bb2c0a78aebb0"><td class="memItemLeft" align="right" valign="top">Real&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_p_h_1_1_branch.html#a7ee59f1587b77188b80bb2c0a78aebb0">segment_length_</a></td></tr>
<tr class="separator:a7ee59f1587b77188b80bb2c0a78aebb0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a618ec5006b37242714510ac799cca64f"><td class="memItemLeft" align="right" valign="top"><a id="a618ec5006b37242714510ac799cca64f"></a>
<a class="el" href="class_s_p_h_1_1_s_p_h_body.html">SPHBody</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>body_</b></td></tr>
<tr class="separator:a618ec5006b37242714510ac799cca64f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f113609964abcda6f4ac37b4d16efa3"><td class="memItemLeft" align="right" valign="top"><a id="a1f113609964abcda6f4ac37b4d16efa3"></a>
<a class="el" href="class_s_p_h_1_1_base_level_set.html">BaseLevelSet</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>levelset_mesh_</b></td></tr>
<tr class="separator:a1f113609964abcda6f4ac37b4d16efa3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a41c8d82406002d0a13be6ab75a26fb1f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a41c8d82406002d0a13be6ab75a26fb1f">&#9670;&nbsp;</a></span>Branch()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SPH::Branch::Branch </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_s_p_h_1_1_s_p_h_body.html">SPHBody</a> *&#160;</td>
          <td class="paramname"><em>body</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classint.html">int</a>&#160;</td>
          <td class="paramname"><em>parent_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classint.html">int</a>&#160;</td>
          <td class="paramname"><em>init_node_idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Vecd&#160;</td>
          <td class="paramname"><em>init_dir</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Real&#160;</td>
          <td class="paramname"><em>l</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Real&#160;</td>
          <td class="paramname"><em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Real&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_s_p_h_1_1_node.html">Node</a> *&#160;</td>
          <td class="paramname"><em>node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; <a class="el" href="classint.html">int</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>family_nodes_idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classint.html">int</a>&#160;</td>
          <td class="paramname"><em>n_segments</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Project grad to surface. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">body</td><td><a class="el" href="namespace_s_p_h.html">SPH</a> Body </td></tr>
    <tr><td class="paramname">parent_id</td><td>Parent branch ID. </td></tr>
    <tr><td class="paramname">init_node_idx</td><td>initial node to grow the branch. An index that refers to a node in the nodes.nodes. </td></tr>
    <tr><td class="paramname">init_dir</td><td>initial direction to grow the branch. It refers to the direction of the last segment of the mother brach. </td></tr>
    <tr><td class="paramname">l</td><td>length of the branch </td></tr>
    <tr><td class="paramname">angle</td><td>angle (rad) with respect to the init_dir in the plane of surface </td></tr>
    <tr><td class="paramname">w</td><td>repulsitivity parameter. Controls how much the branches repel each other </td></tr>
    <tr><td class="paramname">node</td><td>the object of the class nodes that contains all the nodes of the existing branches. </td></tr>
    <tr><td class="paramname">family_nodes_idx</td><td>the nodes of the brother and mother branches, to be excluded from the collision detection. </td></tr>
    <tr><td class="paramname">n_segments</td><td>number of segments to divide the branch </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ab515674e89dd745d12825c438f26b243"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab515674e89dd745d12825c438f26b243">&#9670;&nbsp;</a></span>creatNewBranchNode()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Point SPH::Branch::creatNewBranchNode </td>
          <td>(</td>
          <td class="paramtype">Point&#160;</td>
          <td class="paramname"><em>init_node</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Vecd&#160;</td>
          <td class="paramname"><em>dir</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Functions that creats a new node in the mesh surface and it to the queue is it lies in the surface. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">init_node</td><td>vector that contains the coordinates of the last node added in the branch. vector that contains the coordinates of the last node added in the branch. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dir</td><td>a vector that contains the direction from the init_node to the node to project. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">bool</td><td>true if the new node is in the triangle. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="aa916034dcbbd9fed90893cf039b22bb4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa916034dcbbd9fed90893cf039b22bb4">&#9670;&nbsp;</a></span>branch_nodes_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;Point&gt; SPH::Branch::branch_nodes_</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Contains the node indices of the branch. </p>

</div>
</div>
<a id="aa1a0f16b34a6b9a1bed32e2dff66e0e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa1a0f16b34a6b9a1bed32e2dff66e0e4">&#9670;&nbsp;</a></span>child_branchs_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;<a class="el" href="classint.html">int</a>&gt; SPH::Branch::child_branchs_</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Contains the indexes of the child branches. It is not assigned when created </p>

</div>
</div>
<a id="a4decacd1462c03d4ee56245b3225a77e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4decacd1462c03d4ee56245b3225a77e">&#9670;&nbsp;</a></span>growing_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classbool.html">bool</a> SPH::Branch::growing_ = true</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>False if the branch collide or is out of the surface. True otherwise. </p>

</div>
</div>
<a id="ac0952d5bfac3963929adc077dc446c84"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac0952d5bfac3963929adc077dc446c84">&#9670;&nbsp;</a></span>node_idxs_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;<a class="el" href="classint.html">int</a>&gt; SPH::Branch::node_idxs_</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Contains the node indices of the branch. </p>

</div>
</div>
<a id="a79fc50611d5ff8c362184f8410f32455"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a79fc50611d5ff8c362184f8410f32455">&#9670;&nbsp;</a></span>parent_branch_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classint.html">int</a> SPH::Branch::parent_branch_</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Index of parent branch. </p>

</div>
</div>
<a id="a7724eb0c597006ad832eeb9b6263b9a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7724eb0c597006ad832eeb9b6263b9a6">&#9670;&nbsp;</a></span>segment_dir_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Vecd SPH::Branch::segment_dir_</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Direction of the last segment of the branch. </p>

</div>
</div>
<a id="a7ee59f1587b77188b80bb2c0a78aebb0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7ee59f1587b77188b80bb2c0a78aebb0">&#9670;&nbsp;</a></span>segment_length_</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Real SPH::Branch::segment_length_</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>approximated length of segments. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>SPHINXsys/src/shared/network/<a class="el" href="network_8h_source.html">network.h</a></li>
<li>SPHINXsys/src/shared/network/network.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
